import request from '@/utils/request'

// 查询员工调动列表
export function listEmployeeTransfer(query) {
    return request({
        url: '/ehr/employeeTransfer/list',
        method: 'get',
        params: query
    })
}

// 查询员工调动详细
export function getEmployeeTransfer(transferId) {
    return request({
        url: '/ehr/employeeTransfer/' + transferId,
        method: 'get'
    })
}

// 新增员工调动
export function addEmployeeTransfer(data) {
    return request({
        url: '/ehr/employeeTransfer',
        method: 'post',
        data: data
    })
}

// 修改员工调动
export function updateEmployeeTransfer(data) {
    return request({
        url: '/ehr/employeeTransfer',
        method: 'put',
        data: data
    })
}

// 删除员工调动
export function delEmployeeTransfer(transferId) {
    return request({
        url: '/ehr/employeeTransfer/' + transferId,
        method: 'delete'
    })
}

// 提交员工调动审批
export function approvalEmployeeTransfer(data) {
    return request({
        url: '/ehr/employeeTransfer/approval',
        method: 'post',
        data: data
    })
}

// 员工调动-获取对应员工信息
export function getEmpInfoIndex(partyId) {
    return request({
        url: '/ehr/employeeTransfer/getEmpInfo',
        method: 'get',
        params: {
            'partyId': partyId
        }
    })
}